Conventionally, in machine tools or the like, a position detecting device for detecting a position created by the rotational movement or linear movement of a movable body is used. One type of known position detecting device is provided with a medium/media where magnetic signals are recorded and a magnetic sensor, where the magnetic sensor can output a signal indicating a relative positional relationship between a medium and the magnetic sensor.
One known magnetic sensor used in such a position detecting device is a multilayer body having a free layer and a magnetization pinned layer, and being provided with a magnetoresistive effect element (MR element) where resistance is changed relative to the magnetization direction of the free layer according to an external magnetic field. Further, known media used in such a position detecting device include, for example, one having a track for absolute signals, one having a track for incremental signals, and one having a track for absolute signals and a track for incremental signals.
Conventionally, a magnetic sensor that is used for the position detecting device equipped with a medium having a track for absolute signals and a track for incremental signals has two types of MR elements: an MR element for detecting a magnetic signal recorded in the track for absolute signals, and an MR element for detecting a magnetic signal recorded in the track for incremental signals (see Patent Literature 1).